from django.urls import path,include,re_path
from . import views
from rest_framework_jwt.views import obtain_jwt_token
from rest_framework.routers import DefaultRouter


router = DefaultRouter()
router.register('addresses',views.AddressViewSet,base_name="addresses")

urlpatterns = [
    path(r'api-token-auth/', obtain_jwt_token),
    path('users/',views.UserLogin.as_view()),
    path('userinfo/',views.UserInfoView.as_view()),
    path('realname/',views.UserRealNameView.as_view()),
    path('change_gender/',views.UserGenderView.as_view()),
    re_path(r'^verify_codes/(?P<mobile>1[3-9]\d{9})/$',views.SMSCodeView.as_view()),
    path('change_mobile/',views.UserMobileRegisterView.as_view()),
    path('feedback/',views.FeedBackView.as_view()),
    # re_path('^mobile/(?P<pk>\d+)/$',views.GetMobileView.as_view()),
    # path('api-token-auth/', obtain_jwt_token),
    # path(r'',include(router.urls)),
]
urlpatterns += router.urls